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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: B = None
        self.r: G = None
        self.q: D = None
        self.y: G = None
        self.t: B = None
        self.txt = txt

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

l = A("l")
d = B("d")
n = C("n")
h = D("h")
a = E("a")
c = F("c")
f = G("f")
e = B("e")
m = A("m")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: B = None
        self.r: G = None
        self.q: D = None
        self.y: G = None
        self.t: B = None
        self.txt = txt

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

l = A("l")
d = B("d")
n = C("n")
h = D("h")
a = E("a")
c = F("c")
f = G("f")
e = B("e")
m = A("m")

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