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

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

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.p: F = None
        self.s: C = None
        self.y: D = None
        self.r: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: H = None
        self.p: A = None
        self.r: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: B = None
        self.s: F = None
        self.p: B = None
        self.w: E = None
        self.txt = txt

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

f = A("f")
b = B("b")
a = C("a")
e = D("e")
l = E("l")
i = F("i")
j = G("j")
c = H("c")
h = C("h")
d = F("d")

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

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

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.p: F = None
        self.s: C = None
        self.y: D = None
        self.r: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: H = None
        self.p: A = None
        self.r: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: B = None
        self.s: F = None
        self.p: B = None
        self.w: E = None
        self.txt = txt

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

f = A("f")
b = B("b")
a = C("a")
e = D("e")
l = E("l")
i = F("i")
j = G("j")
c = H("c")
h = C("h")
d = F("d")

f.z = a
f.u = j
f.t = j
f.o = j
b.p = i
b.y = h
b.r = c
a.w = e
a.y = e
a.p = i
a.r = i
a.s = h
e.p = f
e.s = c
e.q = j
e.u = h
l.z = i
l.y = c
l.p = f
l.r = b
i.q = d
j.u = c
j.v = b
j.p = b
j.s = d
j.w = l
c.s = l
c.u = b
h.w = e
h.y = e
h.p = i
h.s = a
h.r = d
d.q = i
assert j.u.u.r.s.r.y.s.s.r.q.txt == "i"