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

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

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.z: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: B = None
        self.x: H = None
        self.v: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: H = None
        self.y: C = None
        self.o: H = None
        self.u: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: D = None
        self.w: A = None
        self.s: B = None
        self.p: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.z: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: B = None
        self.x: H = None
        self.v: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: H = None
        self.y: C = None
        self.o: H = None
        self.u: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: D = None
        self.w: A = None
        self.s: B = None
        self.p: G = None
        self.txt = txt

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

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