class A:
    def __init__(self, txt: str):
        self.p: G = None
        self.x: H = None
        self.q: G = None
        self.s: H = None
        self.z: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.o: D = None
        self.u: B = None
        self.s: H = None
        self.v: I = None
        self.t: H = None
        self.q: A = None
        self.z: I = None
        self.x: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.q: G = None
        self.x: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: I = None
        self.x: D = None
        self.t: F = None
        self.w: A = None
        self.q: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: B = None
        self.s: G = None
        self.q: D = None
        self.p: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: F = None
        self.r: G = None
        self.y: G = None
        self.w: C = None
        self.x: A = None
        self.o: F = None
        self.s: D = None
        self.txt = txt

l = A("l")
f = B("f")
h = C("h")
i = D("i")
j = E("j")
e = F("e")
b = G("b")
d = H("d")
k = I("k")

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

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

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.o: D = None
        self.u: B = None
        self.s: H = None
        self.v: I = None
        self.t: H = None
        self.q: A = None
        self.z: I = None
        self.x: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.q: G = None
        self.x: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: I = None
        self.x: D = None
        self.t: F = None
        self.w: A = None
        self.q: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: B = None
        self.s: G = None
        self.q: D = None
        self.p: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: C = None
        self.p: F = None
        self.r: G = None
        self.y: G = None
        self.w: C = None
        self.x: A = None
        self.o: F = None
        self.s: D = None
        self.txt = txt

l = A("l")
f = B("f")
h = C("h")
i = D("i")
j = E("j")
e = F("e")
b = G("b")
d = H("d")
k = I("k")

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