class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.p: I = None
        self.v: H = None
        self.w: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: A = None
        self.p: H = None
        self.q: C = None
        self.y: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: E = None
        self.p: D = None
        self.z: D = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: I = None
        self.q: I = None
        self.txt = txt

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

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

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

l.t = h
l.v = h
l.p = c
l.w = b
a.w = b
a.x = l
a.y = l
a.p = h
a.q = k
k.t = h
k.v = h
k.u = m
j.x = l
j.u = f
b.s = a
m.v = j
m.p = j
m.z = j
m.t = j
m.y = b
f.s = a
f.x = c
f.q = c
h.q = f
c.t = m
c.w = m
c.s = a
c.r = f
c.z = b
c.p = k
assert j.x.w.s.w.s.w.s.q.txt == "
class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.p: I = None
        self.v: H = None
        self.w: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: A = None
        self.p: H = None
        self.q: C = None
        self.y: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: E = None
        self.p: D = None
        self.z: D = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: I = None
        self.q: I = None
        self.txt = txt

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

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

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

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