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

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

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.u: A = None
        self.t: C = None
        self.y: B = None
        self.txt = txt

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

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

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

b = A("b")
g = B("g")
j = C("j")
c = D("c")
k = E("k")
f = F("f")
a = G("a")
m = B("m")
e = C("e")

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.u: A = None
        self.t: C = None
        self.y: B = None
        self.txt = txt

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

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

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

b = A("b")
g = B("g")
j = C("j")
c = D("c")
k = E("k")
f = F("f")
a = G("a")
m = B("m")
e = C("e")

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