class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: F = None
        self.q: D = None
        self.t: C = None
        self.z: H = None
        self.y: B = None
        self.p: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: I = None
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: F = None
        self.o: H = None
        self.t: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: I = None
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: F = None
        self.o: H = None
        self.t: C = None
        self.txt = txt

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

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