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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: F = None
        self.z: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: F = None
        self.z: F = None
        self.txt = txt

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

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

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