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

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

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.p: F = None
        self.r: F = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.p: F = None
        self.r: F = None
        self.txt = txt

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

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

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

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

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