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

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

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

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

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

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

c = A("c")
b = B("b")
j = C("j")
d = D("d")
g = E("g")
n = F("n")
f = B("f")
k = A("k")
i = F("i")
m = E("m")

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

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

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

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

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

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

c = A("c")
b = B("b")
j = C("j")
d = D("d")
g = E("g")
n = F("n")
f = B("f")
k = A("k")
i = F("i")
m = E("m")

c.x = j
c.p = j
c.o = d
c.t = m
c.s = g
b.y = d
b.u = c
b.w = n
j.o = c
j.x = k
j.z = f
j.v = g
j.y = g
d.o = f
g.q = c
n.y = b
n.w = d
n.u = j
n.z = m
n.s = m
n.r = i
f.y = d
f.u = k
f.w = n
k.x = j
k.p = j
k.o = d
k.t = m
k.s = g
i.y = f
i.w = d
i.u = j
i.z = m
i.r = n
i.s = g
m.q = k
assert i.u.o.s.q.p.o.t.txt == "m"