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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

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