class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.y: D = None
        self.q: C = None
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: C = None
        self.q: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: E = None
        self.r: F = None
        self.q: F = None
        self.o: E = None
        self.y: A = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: C = None
        self.q: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: E = None
        self.r: F = None
        self.q: F = None
        self.o: E = None
        self.y: A = None
        self.txt = txt

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

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

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

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

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