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

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: F = None
        self.v: A = None
        self.z: E = None
        self.o: F = None
        self.r: B = None
        self.x: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: E = None
        self.o: B = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: F = None
        self.v: A = None
        self.z: E = None
        self.o: F = None
        self.r: B = None
        self.x: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: E = None
        self.o: B = None
        self.txt = txt

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

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

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

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

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