class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: C = None
        self.u: B = None
        self.x: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: B = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: E = None
        self.x: B = None
        self.v: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: C = None
        self.t: A = None
        self.z: F = None
        self.u: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: E = None
        self.r: B = None
        self.txt = txt

b = A("b")
e = B("e")
g = C("g")
c = D("c")
d = E("d")
i = F("i")
l = C("l")
m = B("m")
k = D("k")

b.v = c
b.z = l
b.x = l
b.u = m
e.u = m
e.v = m
e.s = c
g.w = m
g.z = d
g.v = d
g.x = e
c.p = l
c.s = l
c.t = b
c.u = b
c.z = i
d.z = l
i.v = e
i.p = d
i.r = m
l.w = e
l.z = d
l.v = d
l.x = m
m.u = e
m.v = e
m.s = k
k.p = l
k.s = l
k.t = b
k.u = b
k.z = i
assert l.x.v.s.t.x.w.u.v.v.txt == "
class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: C = None
        self.u: B = None
        self.x: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: B = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: E = None
        self.x: B = None
        self.v: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: C = None
        self.t: A = None
        self.z: F = None
        self.u: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: E = None
        self.r: B = None
        self.txt = txt

b = A("b")
e = B("e")
g = C("g")
c = D("c")
d = E("d")
i = F("i")
l = C("l")
m = B("m")
k = D("k")

b.v = c
b.z = l
b.x = l
b.u = m
e.u = m
e.v = m
e.s = c
g.w = m
g.z = d
g.v = d
g.x = e
c.p = l
c.s = l
c.t = b
c.u = b
c.z = i
d.z = l
i.v = e
i.p = d
i.r = m
l.w = e
l.z = d
l.v = d
l.x = m
m.u = e
m.v = e
m.s = k
k.p = l
k.s = l
k.t = b
k.u = b
k.z = i
assert l.x.v.s.t.x.w.u.v.v.txt == "m"