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

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: F = None
        self.s: A = None
        self.o: D = None
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.s: E = None
        self.y: H = None
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: G = None
        self.t: H = None
        self.y: A = None
        self.q: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.q: C = None
        self.w: B = None
        self.p: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: F = None
        self.u: E = None
        self.w: H = None
        self.p: D = None
        self.s: F = None
        self.z: H = None
        self.r: F = None
        self.t: D = None
        self.txt = txt

c = A("c")
f = B("f")
m = C("m")
k = D("k")
g = E("g")
a = F("a")
n = G("n")
j = H("j")
e = I("e")
l = D("l")

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

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: F = None
        self.s: A = None
        self.o: D = None
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.s: E = None
        self.y: H = None
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: G = None
        self.t: H = None
        self.y: A = None
        self.q: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.q: C = None
        self.w: B = None
        self.p: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: F = None
        self.u: E = None
        self.w: H = None
        self.p: D = None
        self.s: F = None
        self.z: H = None
        self.r: F = None
        self.t: D = None
        self.txt = txt

c = A("c")
f = B("f")
m = C("m")
k = D("k")
g = E("g")
a = F("a")
n = G("n")
j = H("j")
e = I("e")
l = D("l")

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