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

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

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.w: C = None
        self.z: D = None
        self.v: F = None
        self.p: A = None
        self.txt = txt

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

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

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

b.y = f
m.s = f
m.z = f
m.p = b
a.w = b
a.p = b
a.r = b
a.t = m
a.z = m
a.x = d
h.z = b
h.u = a
d.u = m
d.w = a
d.z = h
d.v = j
d.p = b
l.v = c
l.u = i
l.z = d
l.y = m
l.w = b
i.o = d
i.y = l
c.w = b
c.p = b
c.r = b
c.t = m
c.z = m
c.x = d
f.o = d
f.y = j
j.v = c
j.u = i
j.z = d
j.y = m
j.w = b
assert a.r.y.o.w.z.txt == "
class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.w: C = None
        self.z: D = None
        self.v: F = None
        self.p: A = None
        self.txt = txt

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

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

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

b.y = f
m.s = f
m.z = f
m.p = b
a.w = b
a.p = b
a.r = b
a.t = m
a.z = m
a.x = d
h.z = b
h.u = a
d.u = m
d.w = a
d.z = h
d.v = j
d.p = b
l.v = c
l.u = i
l.z = d
l.y = m
l.w = b
i.o = d
i.y = l
c.w = b
c.p = b
c.r = b
c.t = m
c.z = m
c.x = d
f.o = d
f.y = j
j.v = c
j.u = i
j.z = d
j.y = m
j.w = b
assert a.r.y.o.w.z.txt == "m"