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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: B = None
        self.p: A = None
        self.y: A = None
        self.s: G = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.w: C = None
        self.u: B = None
        self.y: G = None
        self.v: F = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: B = None
        self.p: A = None
        self.y: A = None
        self.s: G = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.w: C = None
        self.u: B = None
        self.y: G = None
        self.v: F = None
        self.txt = txt

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

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

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

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