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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: B = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: B = None
        self.txt = txt

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

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