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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.r: F = None
        self.q: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: I = None
        self.y: F = None
        self.u: I = None
        self.r: F = None
        self.v: A = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: H = None
        self.p: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: A = None
        self.r: C = None
        self.p: I = None
        self.t: B = None
        self.o: I = None
        self.q: H = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.r: F = None
        self.q: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: I = None
        self.y: F = None
        self.u: I = None
        self.r: F = None
        self.v: A = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: H = None
        self.p: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: A = None
        self.r: C = None
        self.p: I = None
        self.t: B = None
        self.o: I = None
        self.q: H = None
        self.txt = txt

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

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

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

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