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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: E = None
        self.p: F = None
        self.u: D = None
        self.t: B = None
        self.txt = txt

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

j = A("j")
a = B("a")
f = C("f")
c = D("c")
b = E("b")
n = F("n")
h = B("h")
d = E("d")

j.x = b
a.s = c
a.o = j
f.t = j
f.x = j
f.p = n
c.y = f
c.s = f
c.w = f
c.v = a
c.q = h
b.s = n
b.p = n
b.v = d
b.u = c
b.t = h
n.z = b
n.y = h
n.o = j
n.p = j
n.x = c
n.v = d
h.s = c
h.o = j
d.s = n
d.p = n
d.v = b
d.u = c
d.t = a
assert h.o.x.s.v.txt == "
class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: E = None
        self.p: F = None
        self.u: D = None
        self.t: B = None
        self.txt = txt

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

j = A("j")
a = B("a")
f = C("f")
c = D("c")
b = E("b")
n = F("n")
h = B("h")
d = E("d")

j.x = b
a.s = c
a.o = j
f.t = j
f.x = j
f.p = n
c.y = f
c.s = f
c.w = f
c.v = a
c.q = h
b.s = n
b.p = n
b.v = d
b.u = c
b.t = h
n.z = b
n.y = h
n.o = j
n.p = j
n.x = c
n.v = d
h.s = c
h.o = j
d.s = n
d.p = n
d.v = b
d.u = c
d.t = a
assert h.o.x.s.v.txt == "d"