class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.t: E = None
        self.p: G = None
        self.q: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: B = None
        self.y: F = None
        self.u: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: H = None
        self.t: G = None
        self.q: C = None
        self.s: G = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: C = None
        self.x: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: F = None
        self.x: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: G = None
        self.p: C = None
        self.o: C = None
        self.r: B = None
        self.txt = txt

j = A("j")
l = B("l")
h = C("h")
k = D("k")
e = E("e")
f = F("f")
i = G("i")
n = H("n")

j.z = f
j.q = f
j.t = e
j.p = i
l.y = f
l.r = k
h.q = n
h.u = n
h.p = l
h.y = f
k.u = n
k.y = n
k.t = i
k.s = i
k.q = h
k.w = f
e.z = h
e.w = h
e.x = h
f.v = h
f.u = n
i.o = k
i.v = f
i.x = f
n.v = f
n.s = i
n.p = h
n.o = h
n.r = l
assert j.t.x.p.y.txt == "
class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.t: E = None
        self.p: G = None
        self.q: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: B = None
        self.y: F = None
        self.u: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: H = None
        self.t: G = None
        self.q: C = None
        self.s: G = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: C = None
        self.x: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: F = None
        self.x: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: G = None
        self.p: C = None
        self.o: C = None
        self.r: B = None
        self.txt = txt

j = A("j")
l = B("l")
h = C("h")
k = D("k")
e = E("e")
f = F("f")
i = G("i")
n = H("n")

j.z = f
j.q = f
j.t = e
j.p = i
l.y = f
l.r = k
h.q = n
h.u = n
h.p = l
h.y = f
k.u = n
k.y = n
k.t = i
k.s = i
k.q = h
k.w = f
e.z = h
e.w = h
e.x = h
f.v = h
f.u = n
i.o = k
i.v = f
i.x = f
n.v = f
n.s = i
n.p = h
n.o = h
n.r = l
assert j.t.x.p.y.txt == "f"