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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: G = None
        self.z: F = None
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: G = None
        self.p: A = None
        self.t: G = None
        self.q: F = None
        self.v: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: B = None
        self.w: F = None
        self.u: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.r: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: G = None
        self.z: F = None
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: G = None
        self.p: A = None
        self.t: G = None
        self.q: F = None
        self.v: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: B = None
        self.w: F = None
        self.u: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.r: E = None
        self.txt = txt

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

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

j.t = n
j.v = n
j.u = c
n.v = c
n.t = k
n.w = k
n.z = i
c.s = j
c.p = j
c.o = k
c.t = k
c.v = k
c.q = i
a.z = k
a.s = n
a.w = d
a.u = c
e.s = j
i.z = j
i.r = e
k.x = n
k.q = e
d.z = j
d.r = e
assert e.s.t.z.txt == "i"