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

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: H = None
        self.t: A = None
        self.u: E = None
        self.s: D = None
        self.p: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: B = None
        self.u: A = None
        self.z: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.x: H = None
        self.w: B = None
        self.s: B = None
        self.o: H = None
        self.p: E = None
        self.z: I = None
        self.u: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: G = None
        self.v: G = None
        self.u: E = None
        self.r: B = None
        self.t: G = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: H = None
        self.t: A = None
        self.u: E = None
        self.s: D = None
        self.p: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: B = None
        self.u: A = None
        self.z: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.x: H = None
        self.w: B = None
        self.s: B = None
        self.o: H = None
        self.p: E = None
        self.z: I = None
        self.u: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: G = None
        self.v: G = None
        self.u: E = None
        self.r: B = None
        self.t: G = None
        self.txt = txt

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

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

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