class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: E = None
        self.w: B = None
        self.s: I = None
        self.p: I = None
        self.t: I = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.o: G = None
        self.r: G = None
        self.x: G = None
        self.z: A = None
        self.t: E = None
        self.p: E = None
        self.u: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: H = None
        self.u: C = None
        self.s: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: B = None
        self.x: I = None
        self.r: D = None
        self.z: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: H = None
        self.s: D = None
        self.v: H = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.o: G = None
        self.r: G = None
        self.x: G = None
        self.z: A = None
        self.t: E = None
        self.p: E = None
        self.u: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: H = None
        self.u: C = None
        self.s: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: B = None
        self.x: I = None
        self.r: D = None
        self.z: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: H = None
        self.s: D = None
        self.v: H = None
        self.txt = txt

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

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