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

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: E = None
        self.y: C = None
        self.w: C = None
        self.q: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: D = None
        self.t: D = None
        self.x: A = None
        self.r: C = None
        self.v: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: E = None
        self.y: C = None
        self.w: C = None
        self.q: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: D = None
        self.t: D = None
        self.x: A = None
        self.r: C = None
        self.v: A = None
        self.txt = txt

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

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