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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: B = None
        self.q: F = None
        self.v: E = None
        self.s: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: F = None
        self.r: E = None
        self.txt = txt

b = A("b")
g = B("g")
e = C("e")
m = D("m")
a = E("a")
n = F("n")
l = C("l")
c = F("c")
h = B("h")

b.z = e
b.p = a
g.z = a
g.v = a
g.x = h
g.q = n
g.s = m
e.w = a
e.p = a
e.v = m
e.s = m
e.y = b
e.t = c
m.w = a
m.t = a
m.o = e
m.x = h
a.r = m
a.q = m
n.v = h
n.o = c
n.r = a
l.w = a
l.p = a
l.v = m
l.s = m
l.y = b
l.t = c
c.v = g
c.o = n
c.r = a
h.z = a
h.v = a
h.x = g
h.q = n
h.s = m
assert b.z.p.r.o.s.txt == "
class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: B = None
        self.q: F = None
        self.v: E = None
        self.s: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: F = None
        self.r: E = None
        self.txt = txt

b = A("b")
g = B("g")
e = C("e")
m = D("m")
a = E("a")
n = F("n")
l = C("l")
c = F("c")
h = B("h")

b.z = e
b.p = a
g.z = a
g.v = a
g.x = h
g.q = n
g.s = m
e.w = a
e.p = a
e.v = m
e.s = m
e.y = b
e.t = c
m.w = a
m.t = a
m.o = e
m.x = h
a.r = m
a.q = m
n.v = h
n.o = c
n.r = a
l.w = a
l.p = a
l.v = m
l.s = m
l.y = b
l.t = c
c.v = g
c.o = n
c.r = a
h.z = a
h.v = a
h.x = g
h.q = n
h.s = m
assert b.z.p.r.o.s.txt == "m"