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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: E = None
        self.q: B = None
        self.t: D = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: E = None
        self.q: B = None
        self.t: D = None
        self.txt = txt

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

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