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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: F = None
        self.z: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: B = None
        self.q: B = None
        self.s: E = None
        self.t: F = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: F = None
        self.z: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: B = None
        self.q: B = None
        self.s: E = None
        self.t: F = None
        self.txt = txt

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

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

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

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

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