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

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: F = None
        self.v: D = None
        self.t: G = None
        self.z: G = None
        self.s: E = None
        self.r: E = None
        self.o: E = None
        self.q: H = None
        self.y: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.r: B = None
        self.o: A = None
        self.x: D = None
        self.s: D = None
        self.txt = txt

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

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

c = A("c")
g = B("g")
f = C("f")
a = D("a")
k = E("k")
m = F("m")
e = G("e")
l = H("l")
d = I("d")
n = J("n")

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

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: F = None
        self.v: D = None
        self.t: G = None
        self.z: G = None
        self.s: E = None
        self.r: E = None
        self.o: E = None
        self.q: H = None
        self.y: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.r: B = None
        self.o: A = None
        self.x: D = None
        self.s: D = None
        self.txt = txt

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

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

c = A("c")
g = B("g")
f = C("f")
a = D("a")
k = E("k")
m = F("m")
e = G("e")
l = H("l")
d = I("d")
n = J("n")

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