class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: E = None
        self.r: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: D = None
        self.x: A = None
        self.w: D = None
        self.u: B = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: D = None
        self.z: B = None
        self.txt = txt

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

j = A("j")
e = B("e")
b = C("b")
c = D("c")
m = E("m")
d = F("d")
a = B("a")

j.y = a
j.o = m
j.r = m
e.q = m
e.z = c
e.w = c
e.x = j
e.u = a
b.u = e
b.w = e
b.v = m
b.z = d
b.o = a
c.s = d
c.y = m
m.r = d
m.o = c
m.z = a
d.z = a
d.y = a
d.r = c
d.p = m
a.q = m
a.z = c
a.w = c
a.x = j
a.u = e
assert j.y.w.s.z.x.y.x.txt == "
class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: E = None
        self.r: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: D = None
        self.x: A = None
        self.w: D = None
        self.u: B = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: D = None
        self.z: B = None
        self.txt = txt

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

j = A("j")
e = B("e")
b = C("b")
c = D("c")
m = E("m")
d = F("d")
a = B("a")

j.y = a
j.o = m
j.r = m
e.q = m
e.z = c
e.w = c
e.x = j
e.u = a
b.u = e
b.w = e
b.v = m
b.z = d
b.o = a
c.s = d
c.y = m
m.r = d
m.o = c
m.z = a
d.z = a
d.y = a
d.r = c
d.p = m
a.q = m
a.z = c
a.w = c
a.x = j
a.u = e
assert j.y.w.s.z.x.y.x.txt == "j"