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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: E = None
        self.y: E = None
        self.u: H = None
        self.w: C = None
        self.z: A = None
        self.p: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: C = None
        self.r: D = None
        self.z: D = None
        self.p: A = None
        self.q: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: C = None
        self.z: G = None
        self.w: H = None
        self.x: B = None
        self.p: B = None
        self.r: C = None
        self.o: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: E = None
        self.y: E = None
        self.u: H = None
        self.w: C = None
        self.z: A = None
        self.p: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: C = None
        self.r: D = None
        self.z: D = None
        self.p: A = None
        self.q: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: C = None
        self.z: G = None
        self.w: H = None
        self.x: B = None
        self.p: B = None
        self.r: C = None
        self.o: C = None
        self.txt = txt

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

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