class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: C = None
        self.x: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: B = None
        self.q: D = None
        self.o: B = None
        self.r: A = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: B = None
        self.q: D = None
        self.o: B = None
        self.r: A = None
        self.txt = txt

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

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

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