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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: G = None
        self.x: F = None
        self.s: A = None
        self.p: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

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

d.o = i
d.s = b
d.u = e
n.v = h
n.x = h
n.t = k
n.s = d
n.p = i
e.z = d
b.w = i
b.r = i
b.u = m
b.v = m
b.p = e
b.o = h
i.p = m
i.t = l
h.x = c
m.o = l
m.z = e
m.x = i
m.u = i
c.v = h
c.x = h
c.t = m
c.s = d
c.p = i
k.o = d
k.z = e
k.x = i
k.u = i
l.o = i
l.s = b
l.u = e
assert l.u.z.o.p.txt == "
class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: D = None
        self.u: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: G = None
        self.x: F = None
        self.s: A = None
        self.p: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

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

d.o = i
d.s = b
d.u = e
n.v = h
n.x = h
n.t = k
n.s = d
n.p = i
e.z = d
b.w = i
b.r = i
b.u = m
b.v = m
b.p = e
b.o = h
i.p = m
i.t = l
h.x = c
m.o = l
m.z = e
m.x = i
m.u = i
c.v = h
c.x = h
c.t = m
c.s = d
c.p = i
k.o = d
k.z = e
k.x = i
k.u = i
l.o = i
l.s = b
l.u = e
assert l.u.z.o.p.txt == "m"