class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: F = None
        self.r: C = None
        self.y: I = None
        self.t: I = None
        self.x: H = None
        self.u: B = None
        self.v: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.w: G = None
        self.q: G = None
        self.s: H = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: H = None
        self.u: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: C = None
        self.z: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.r: F = None
        self.u: E = None
        self.p: B = None
        self.v: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: F = None
        self.r: C = None
        self.y: I = None
        self.t: I = None
        self.x: H = None
        self.u: B = None
        self.v: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.w: G = None
        self.q: G = None
        self.s: H = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: H = None
        self.u: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: C = None
        self.z: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.r: F = None
        self.u: E = None
        self.p: B = None
        self.v: E = None
        self.txt = txt

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

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