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

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

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

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

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

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

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

n = A("n")
k = B("k")
h = C("h")
e = D("e")
j = E("j")
m = F("m")
d = G("d")
f = D("f")

n.u = j
n.y = h
k.r = e
k.y = n
k.o = h
h.z = d
h.s = j
h.q = j
h.t = e
h.o = e
h.u = k
h.x = f
e.w = j
e.x = f
j.w = m
m.z = k
m.u = d
m.q = n
m.w = f
m.r = h
m.x = j
d.x = f
d.y = n
d.t = n
f.w = j
f.x = e
assert j.w.u.y.y.z.x.x.x.txt == "
class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: C = None
        self.txt = txt

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

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

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

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

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

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

n = A("n")
k = B("k")
h = C("h")
e = D("e")
j = E("j")
m = F("m")
d = G("d")
f = D("f")

n.u = j
n.y = h
k.r = e
k.y = n
k.o = h
h.z = d
h.s = j
h.q = j
h.t = e
h.o = e
h.u = k
h.x = f
e.w = j
e.x = f
j.w = m
m.z = k
m.u = d
m.q = n
m.w = f
m.r = h
m.x = j
d.x = f
d.y = n
d.t = n
f.w = j
f.x = e
assert j.w.u.y.y.z.x.x.x.txt == "f"