class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: I = None
        self.o: D = None
        self.p: D = None
        self.y: B = None
        self.x: C = None
        self.q: I = None
        self.u: C = None
        self.w: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.w: G = None
        self.s: A = None
        self.r: A = None
        self.t: D = None
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.y: I = None
        self.w: A = None
        self.q: I = None
        self.v: E = None
        self.t: I = None
        self.u: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: F = None
        self.x: E = None
        self.y: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.w: G = None
        self.s: A = None
        self.r: A = None
        self.t: D = None
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.y: I = None
        self.w: A = None
        self.q: I = None
        self.v: E = None
        self.t: I = None
        self.u: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: F = None
        self.x: E = None
        self.y: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

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

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