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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: F = None
        self.p: C = None
        self.x: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: F = None
        self.v: H = None
        self.y: G = None
        self.s: B = None
        self.z: G = None
        self.p: G = None
        self.t: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: H = None
        self.t: D = None
        self.x: H = None
        self.o: B = None
        self.v: A = None
        self.u: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: F = None
        self.p: C = None
        self.x: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: F = None
        self.v: H = None
        self.y: G = None
        self.s: B = None
        self.z: G = None
        self.p: G = None
        self.t: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: H = None
        self.t: D = None
        self.x: H = None
        self.o: B = None
        self.v: A = None
        self.u: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: D = None
        self.txt = txt

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

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