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

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

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: E = None
        self.s: B = None
        self.y: E = None
        self.r: F = None
        self.o: B = None
        self.p: B = None
        self.v: G = None
        self.t: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: F = None
        self.q: H = None
        self.r: F = None
        self.w: B = None
        self.u: G = None
        self.x: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: E = None
        self.s: B = None
        self.y: E = None
        self.r: F = None
        self.o: B = None
        self.p: B = None
        self.v: G = None
        self.t: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: F = None
        self.q: H = None
        self.r: F = None
        self.w: B = None
        self.u: G = None
        self.x: D = None
        self.txt = txt

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

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