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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: A = None
        self.p: G = None
        self.o: E = None
        self.q: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: D = None
        self.y: C = None
        self.o: D = None
        self.q: D = None
        self.x: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: B = None
        self.u: C = None
        self.o: G = None
        self.z: D = None
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: D = None
        self.z: B = None
        self.q: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: A = None
        self.p: G = None
        self.o: E = None
        self.q: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: D = None
        self.y: C = None
        self.o: D = None
        self.q: D = None
        self.x: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: B = None
        self.u: C = None
        self.o: G = None
        self.z: D = None
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: D = None
        self.z: B = None
        self.q: E = None
        self.txt = txt

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

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

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