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

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

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

class D:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: B = None
        self.r: C = None
        self.t: E = None
        self.w: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: B = None
        self.y: B = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: B = None
        self.r: C = None
        self.t: E = None
        self.w: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: B = None
        self.y: B = None
        self.txt = txt

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

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

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