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

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

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: A = None
        self.s: F = None
        self.x: B = None
        self.z: C = None
        self.v: B = None
        self.u: F = None
        self.q: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

f = A("f")
j = B("j")
c = C("c")
l = D("l")
m = E("m")
i = F("i")
d = G("d")
k = H("k")
n = D("n")

f.y = k
f.p = d
f.x = d
f.z = d
j.w = d
j.x = d
j.t = f
j.o = c
j.s = m
j.y = n
c.u = n
c.s = j
l.t = c
l.z = c
l.w = f
l.s = i
l.u = i
l.x = j
l.v = j
l.q = k
m.y = l
i.v = j
i.u = m
i.z = l
d.x = k
k.u = c
n.t = c
n.z = c
n.w = f
n.s = i
n.u = i
n.x = j
n.v = j
n.q = k
assert f.p.x.u.s.t.p.x.txt == "
class A:
    def __init__(self, txt: str):
        self.y: H = None
        self.p: G = None
        self.x: G = None
        self.z: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: A = None
        self.s: F = None
        self.x: B = None
        self.z: C = None
        self.v: B = None
        self.u: F = None
        self.q: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

f = A("f")
j = B("j")
c = C("c")
l = D("l")
m = E("m")
i = F("i")
d = G("d")
k = H("k")
n = D("n")

f.y = k
f.p = d
f.x = d
f.z = d
j.w = d
j.x = d
j.t = f
j.o = c
j.s = m
j.y = n
c.u = n
c.s = j
l.t = c
l.z = c
l.w = f
l.s = i
l.u = i
l.x = j
l.v = j
l.q = k
m.y = l
i.v = j
i.u = m
i.z = l
d.x = k
k.u = c
n.t = c
n.z = c
n.w = f
n.s = i
n.u = i
n.x = j
n.v = j
n.q = k
assert f.p.x.u.s.t.p.x.txt == "k"