class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: D = None
        self.z: C = None
        self.t: F = None
        self.p: F = None
        self.x: B = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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