class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: G = None
        self.s: D = None
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.y: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: A = None
        self.q: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: D = None
        self.z: D = None
        self.y: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.y: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: A = None
        self.q: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: D = None
        self.z: D = None
        self.y: D = None
        self.txt = txt

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

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