class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: F = None
        self.w: A = None
        self.q: B = None
        self.y: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

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

c.v = b
c.x = g
c.w = j
c.q = f
c.y = f
f.z = b
f.o = e
b.x = j
e.y = f
e.u = f
e.s = g
e.v = c
e.z = j
e.x = j
a.t = j
a.u = e
a.q = f
g.w = f
d.t = j
d.u = e
d.q = f
j.v = b
j.x = g
j.w = c
j.q = f
j.y = f
assert e.x.y.z.x.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: F = None
        self.w: A = None
        self.q: B = None
        self.y: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

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

c.v = b
c.x = g
c.w = j
c.q = f
c.y = f
f.z = b
f.o = e
b.x = j
e.y = f
e.u = f
e.s = g
e.v = c
e.z = j
e.x = j
a.t = j
a.u = e
a.q = f
g.w = f
d.t = j
d.u = e
d.q = f
j.v = b
j.x = g
j.w = c
j.q = f
j.y = f
assert e.x.y.z.x.txt == "j"