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

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

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.y: A = None
        self.v: E = None
        self.s: G = None
        self.w: B = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: F = None
        self.t: G = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.y: A = None
        self.v: E = None
        self.s: G = None
        self.w: B = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: F = None
        self.t: G = None
        self.txt = txt

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

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