class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: F = None
        self.q: C = None
        self.x: C = None
        self.s: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: C = None
        self.o: A = None
        self.p: B = None
        self.r: E = None
        self.txt = txt

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

j = A("j")
d = B("d")
i = C("i")
a = D("a")
k = E("k")
n = F("n")
h = E("h")
c = B("c")

j.o = a
j.w = n
j.q = i
j.x = i
j.s = i
d.z = j
d.w = j
d.x = n
d.q = n
d.r = c
d.v = i
i.p = a
i.t = a
i.v = a
i.u = d
a.r = j
a.s = n
k.w = c
k.p = c
k.s = i
k.o = j
k.r = h
n.x = i
n.o = i
n.y = j
n.p = j
n.q = j
n.u = c
h.w = c
h.s = i
h.o = j
h.p = d
h.r = k
c.z = j
c.w = j
c.x = n
c.q = n
c.r = d
c.v = i
assert a.s.x.p.r.txt == "
class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: F = None
        self.q: C = None
        self.x: C = None
        self.s: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: C = None
        self.o: A = None
        self.p: B = None
        self.r: E = None
        self.txt = txt

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

j = A("j")
d = B("d")
i = C("i")
a = D("a")
k = E("k")
n = F("n")
h = E("h")
c = B("c")

j.o = a
j.w = n
j.q = i
j.x = i
j.s = i
d.z = j
d.w = j
d.x = n
d.q = n
d.r = c
d.v = i
i.p = a
i.t = a
i.v = a
i.u = d
a.r = j
a.s = n
k.w = c
k.p = c
k.s = i
k.o = j
k.r = h
n.x = i
n.o = i
n.y = j
n.p = j
n.q = j
n.u = c
h.w = c
h.s = i
h.o = j
h.p = d
h.r = k
c.z = j
c.w = j
c.x = n
c.q = n
c.r = d
c.v = i
assert a.s.x.p.r.txt == "j"