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

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: I = None
        self.p: E = None
        self.q: E = None
        self.x: D = None
        self.w: E = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: B = None
        self.u: D = None
        self.s: I = None
        self.q: B = None
        self.w: F = None
        self.o: I = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: I = None
        self.p: E = None
        self.q: E = None
        self.x: D = None
        self.w: E = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: B = None
        self.u: D = None
        self.s: I = None
        self.q: B = None
        self.w: F = None
        self.o: I = None
        self.txt = txt

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

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

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