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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: C = None
        self.t: B = None
        self.o: B = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: C = None
        self.t: B = None
        self.o: B = None
        self.txt = txt

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

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

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