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

class B:
    def __init__(self, txt: str):
        self.x: I = None
        self.y: D = None
        self.s: C = None
        self.z: E = None
        self.p: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: I = None
        self.q: A = None
        self.p: B = None
        self.s: A = None
        self.r: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: H = None
        self.r: H = None
        self.x: B = None
        self.y: C = None
        self.v: H = None
        self.p: G = None
        self.t: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: I = None
        self.o: E = None
        self.r: E = None
        self.x: B = None
        self.z: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: B = None
        self.z: A = None
        self.y: A = None
        self.r: G = None
        self.s: A = None
        self.u: E = None
        self.w: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: I = None
        self.y: D = None
        self.s: C = None
        self.z: E = None
        self.p: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: I = None
        self.q: A = None
        self.p: B = None
        self.s: A = None
        self.r: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: H = None
        self.r: H = None
        self.x: B = None
        self.y: C = None
        self.v: H = None
        self.p: G = None
        self.t: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: I = None
        self.o: E = None
        self.r: E = None
        self.x: B = None
        self.z: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: B = None
        self.z: A = None
        self.y: A = None
        self.r: G = None
        self.s: A = None
        self.u: E = None
        self.w: F = None
        self.txt = txt

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

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