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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: D = None
        self.z: H = None
        self.w: D = None
        self.x: E = None
        self.r: C = None
        self.p: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: F = None
        self.t: H = None
        self.p: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: F = None
        self.t: D = None
        self.o: C = None
        self.s: E = None
        self.x: E = None
        self.r: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: D = None
        self.z: H = None
        self.w: D = None
        self.x: E = None
        self.r: C = None
        self.p: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: F = None
        self.t: H = None
        self.p: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: F = None
        self.t: D = None
        self.o: C = None
        self.s: E = None
        self.x: E = None
        self.r: G = None
        self.txt = txt

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

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