class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: E = None
        self.v: C = None
        self.o: D = None
        self.z: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: E = None
        self.z: D = None
        self.w: D = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: E = None
        self.v: C = None
        self.o: D = None
        self.z: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: E = None
        self.z: D = None
        self.w: D = None
        self.txt = txt

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

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