class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: A = None
        self.t: A = None
        self.q: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: H = None
        self.o: E = None
        self.v: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.t: H = None
        self.p: F = None
        self.u: H = None
        self.o: H = None
        self.v: A = None
        self.q: G = None
        self.y: H = None
        self.r: I = None
        self.x: B = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: A = None
        self.t: A = None
        self.q: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: H = None
        self.o: E = None
        self.v: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.t: H = None
        self.p: F = None
        self.u: H = None
        self.o: H = None
        self.v: A = None
        self.q: G = None
        self.y: H = None
        self.r: I = None
        self.x: B = None
        self.txt = txt

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

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