class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: D = None
        self.t: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: A = None
        self.o: G = None
        self.v: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.z: A = None
        self.s: C = None
        self.o: C = None
        self.p: D = None
        self.q: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: D = None
        self.t: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: A = None
        self.o: G = None
        self.v: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.z: A = None
        self.s: C = None
        self.o: C = None
        self.p: D = None
        self.q: F = None
        self.txt = txt

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

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