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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: C = None
        self.u: A = None
        self.v: E = None
        self.t: F = None
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: C = None
        self.u: A = None
        self.v: E = None
        self.t: F = None
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

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

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