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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: D = None
        self.p: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: H = None
        self.s: F = None
        self.q: E = None
        self.z: D = None
        self.t: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: A = None
        self.u: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: D = None
        self.p: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: H = None
        self.s: F = None
        self.q: E = None
        self.z: D = None
        self.t: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: A = None
        self.u: D = None
        self.txt = txt

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

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