class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: C = None
        self.o: D = None
        self.p: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.y: F = None
        self.r: D = None
        self.o: A = None
        self.z: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: J = None
        self.z: I = None
        self.p: E = None
        self.r: I = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: D = None
        self.v: A = None
        self.o: G = None
        self.q: G = None
        self.x: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: G = None
        self.r: F = None
        self.t: H = None
        self.q: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: D = None
        self.v: F = None
        self.r: G = None
        self.q: E = None
        self.y: D = None
        self.w: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.y: F = None
        self.r: D = None
        self.o: A = None
        self.z: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: J = None
        self.z: I = None
        self.p: E = None
        self.r: I = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: D = None
        self.v: A = None
        self.o: G = None
        self.q: G = None
        self.x: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: G = None
        self.r: F = None
        self.t: H = None
        self.q: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: D = None
        self.v: F = None
        self.r: G = None
        self.q: E = None
        self.y: D = None
        self.w: B = None
        self.txt = txt

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

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