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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: F = None
        self.y: G = None
        self.q: A = None
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: F = None
        self.v: E = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.q: B = None
        self.w: B = None
        self.z: B = None
        self.r: C = None
        self.t: A = None
        self.txt = txt

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

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

c = A("c")
j = B("j")
n = C("n")
m = D("m")
a = E("a")
k = F("k")
i = G("i")
b = A("b")

c.t = j
j.x = i
j.p = k
j.t = k
n.p = c
n.q = c
n.r = k
n.y = i
n.t = a
m.t = i
m.u = k
m.v = a
m.r = b
a.u = i
a.q = j
a.w = j
a.z = j
a.r = n
a.t = c
k.o = n
i.v = n
i.o = a
i.q = a
i.x = c
i.r = c
b.t = j
assert j.x.o.u.x.t.x.v.txt == "
class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: F = None
        self.y: G = None
        self.q: A = None
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: F = None
        self.v: E = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.q: B = None
        self.w: B = None
        self.z: B = None
        self.r: C = None
        self.t: A = None
        self.txt = txt

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

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

c = A("c")
j = B("j")
n = C("n")
m = D("m")
a = E("a")
k = F("k")
i = G("i")
b = A("b")

c.t = j
j.x = i
j.p = k
j.t = k
n.p = c
n.q = c
n.r = k
n.y = i
n.t = a
m.t = i
m.u = k
m.v = a
m.r = b
a.u = i
a.q = j
a.w = j
a.z = j
a.r = n
a.t = c
k.o = n
i.v = n
i.o = a
i.q = a
i.x = c
i.r = c
b.t = j
assert j.x.o.u.x.t.x.v.txt == "n"