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

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: E = None
        self.y: F = None
        self.s: E = None
        self.z: A = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: F = None
        self.s: F = None
        self.t: A = None
        self.o: A = None
        self.txt = txt

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

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

f = A("f")
g = B("g")
n = C("n")
l = D("l")
d = E("d")
j = F("j")
i = B("i")
k = D("k")

f.y = d
f.u = j
f.v = n
f.w = n
f.p = l
f.r = i
g.v = k
g.p = k
g.r = j
n.t = d
n.r = d
n.s = d
n.y = j
n.z = f
n.w = l
l.v = j
l.w = j
l.s = j
l.t = f
l.o = f
d.w = k
j.u = n
j.q = d
j.w = f
i.v = l
i.p = k
i.r = j
k.v = j
k.w = j
k.s = j
k.t = f
k.o = f
assert g.r.w.v.y.txt == "
class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: F = None
        self.v: C = None
        self.p: D = None
        self.w: C = None
        self.r: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: E = None
        self.y: F = None
        self.s: E = None
        self.z: A = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: F = None
        self.s: F = None
        self.t: A = None
        self.o: A = None
        self.txt = txt

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

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

f = A("f")
g = B("g")
n = C("n")
l = D("l")
d = E("d")
j = F("j")
i = B("i")
k = D("k")

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