class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: E = None
        self.x: F = None
        self.p: F = None
        self.r: D = None
        self.o: C = None
        self.v: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: E = None
        self.w: F = None
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: C = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: E = None
        self.w: F = None
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: C = None
        self.txt = txt

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

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

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

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

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

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