class A:
    def __init__(self, txt: str):
        self.r: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: F = None
        self.v: F = None
        self.s: E = None
        self.r: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: A = None
        self.v: F = None
        self.r: C = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.o: E = None
        self.z: A = None
        self.s: C = None
        self.w: F = None
        self.u: B = None
        self.y: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: F = None
        self.v: F = None
        self.s: E = None
        self.r: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: A = None
        self.v: F = None
        self.r: C = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.o: E = None
        self.z: A = None
        self.s: C = None
        self.w: F = None
        self.u: B = None
        self.y: E = None
        self.txt = txt

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

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