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

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

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: D = None
        self.y: F = None
        self.t: F = None
        self.v: A = None
        self.p: G = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: F = None
        self.v: C = None
        self.txt = txt

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

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

n = A("n")
k = B("k")
h = C("h")
c = D("c")
i = E("i")
m = F("m")
d = G("d")
g = E("g")
j = D("j")
l = C("l")

n.x = d
k.t = i
k.p = n
h.q = n
h.o = n
h.v = m
c.w = i
c.x = j
c.y = m
c.t = m
c.v = n
c.p = d
c.o = d
i.q = k
i.p = m
i.v = l
m.s = n
m.z = l
d.p = m
d.z = m
d.s = m
d.u = k
d.o = h
g.q = k
g.p = m
g.v = l
j.w = g
j.x = c
j.y = m
j.t = m
j.v = n
j.p = d
j.o = d
l.q = n
l.o = n
l.v = m
assert l.v.s.x.u.t.txt == "
class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: D = None
        self.y: F = None
        self.t: F = None
        self.v: A = None
        self.p: G = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: F = None
        self.v: C = None
        self.txt = txt

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

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

n = A("n")
k = B("k")
h = C("h")
c = D("c")
i = E("i")
m = F("m")
d = G("d")
g = E("g")
j = D("j")
l = C("l")

n.x = d
k.t = i
k.p = n
h.q = n
h.o = n
h.v = m
c.w = i
c.x = j
c.y = m
c.t = m
c.v = n
c.p = d
c.o = d
i.q = k
i.p = m
i.v = l
m.s = n
m.z = l
d.p = m
d.z = m
d.s = m
d.u = k
d.o = h
g.q = k
g.p = m
g.v = l
j.w = g
j.x = c
j.y = m
j.t = m
j.v = n
j.p = d
j.o = d
l.q = n
l.o = n
l.v = m
assert l.v.s.x.u.t.txt == "i"