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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: D = None
        self.o: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: A = None
        self.s: F = None
        self.q: F = None
        self.w: G = None
        self.o: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: C = None
        self.v: E = None
        self.o: F = None
        self.z: C = None
        self.q: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: D = None
        self.o: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: A = None
        self.s: F = None
        self.q: F = None
        self.w: G = None
        self.o: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: C = None
        self.v: E = None
        self.o: F = None
        self.z: C = None
        self.q: F = None
        self.txt = txt

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

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