class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.z: G = None
        self.x: I = None
        self.s: H = None
        self.p: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: B = None
        self.txt = txt

l = A("l")
d = B("d")
b = C("b")
a = D("a")
g = E("g")
e = F("e")
j = G("j")
k = H("k")
c = I("c")
h = H("h")

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.z: G = None
        self.x: I = None
        self.s: H = None
        self.p: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: B = None
        self.txt = txt

l = A("l")
d = B("d")
b = C("b")
a = D("a")
g = E("g")
e = F("e")
j = G("j")
k = H("k")
c = I("c")
h = H("h")

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