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

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

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: C = None
        self.x: C = None
        self.u: B = None
        self.r: F = None
        self.o: F = None
        self.q: E = None
        self.txt = txt

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

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

i.x = h
i.p = a
i.q = a
i.o = j
a.v = l
a.q = i
a.p = c
g.w = i
g.q = j
g.z = j
g.r = l
g.x = c
g.s = n
c.t = i
c.x = j
l.x = i
j.t = l
j.q = l
j.s = g
j.x = g
j.u = a
j.r = h
j.o = h
n.x = i
h.t = l
h.q = l
h.s = g
h.x = g
h.u = a
h.r = j
h.o = j
assert l.x.x.s.x.t.p.txt == "
class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: B = None
        self.o: F = None
        self.q: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: C = None
        self.x: C = None
        self.u: B = None
        self.r: F = None
        self.o: F = None
        self.q: E = None
        self.txt = txt

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

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

i.x = h
i.p = a
i.q = a
i.o = j
a.v = l
a.q = i
a.p = c
g.w = i
g.q = j
g.z = j
g.r = l
g.x = c
g.s = n
c.t = i
c.x = j
l.x = i
j.t = l
j.q = l
j.s = g
j.x = g
j.u = a
j.r = h
j.o = h
n.x = i
h.t = l
h.q = l
h.s = g
h.x = g
h.u = a
h.r = j
h.o = j
assert l.x.x.s.x.t.p.txt == "a"