class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: D = None
        self.w: D = None
        self.o: B = None
        self.z: E = None
        self.r: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: A = None
        self.o: B = None
        self.r: A = None
        self.w: A = None
        self.v: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: A = None
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

d.x = h
d.z = h
d.v = k
d.w = k
d.o = i
d.r = c
i.p = j
i.v = m
c.w = m
c.v = h
k.u = c
k.q = d
k.o = i
k.r = m
k.w = m
k.v = j
h.o = l
h.p = l
j.u = h
j.y = m
j.z = d
l.p = i
m.x = h
m.z = h
m.v = k
m.w = k
m.o = i
m.r = c
assert c.w.o.p.y.v.r.x.p.txt == "
class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: D = None
        self.w: D = None
        self.o: B = None
        self.z: E = None
        self.r: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: A = None
        self.o: B = None
        self.r: A = None
        self.w: A = None
        self.v: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: A = None
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

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