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

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

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

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.t: A = None
        self.r: G = None
        self.s: I = None
        self.v: H = None
        self.o: B = None
        self.y: H = None
        self.w: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.w: C = None
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: H = None
        self.r: D = None
        self.w: F = None
        self.o: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: E = None
        self.x: D = None
        self.o: I = None
        self.u: I = None
        self.v: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.t: A = None
        self.r: G = None
        self.s: I = None
        self.v: H = None
        self.o: B = None
        self.y: H = None
        self.w: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.w: C = None
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: H = None
        self.r: D = None
        self.w: F = None
        self.o: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: E = None
        self.x: D = None
        self.o: I = None
        self.u: I = None
        self.v: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: A = None
        self.txt = txt

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

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