class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: J = None
        self.z: B = None
        self.t: H = None
        self.q: J = None
        self.r: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: J = None
        self.w: E = None
        self.u: H = None
        self.s: E = None
        self.o: B = None
        self.y: G = None
        self.v: B = None
        self.t: I = None
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: F = None
        self.r: B = None
        self.z: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: J = None
        self.v: G = None
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: B = None
        self.v: D = None
        self.x: I = None
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: D = None
        self.z: B = None
        self.u: G = None
        self.q: E = None
        self.v: A = None
        self.o: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: J = None
        self.q: F = None
        self.p: F = None
        self.o: B = None
        self.y: C = None
        self.z: D = None
        self.v: G = None
        self.t: C = None
        self.w: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: J = None
        self.w: E = None
        self.u: H = None
        self.s: E = None
        self.o: B = None
        self.y: G = None
        self.v: B = None
        self.t: I = None
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: F = None
        self.r: B = None
        self.z: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.v: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: J = None
        self.v: G = None
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: B = None
        self.v: D = None
        self.x: I = None
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: D = None
        self.z: B = None
        self.u: G = None
        self.q: E = None
        self.v: A = None
        self.o: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: J = None
        self.q: F = None
        self.p: F = None
        self.o: B = None
        self.y: C = None
        self.z: D = None
        self.v: G = None
        self.t: C = None
        self.w: D = None
        self.txt = txt

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

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

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