class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: B = None
        self.s: G = None
        self.p: F = None
        self.u: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: E = None
        self.v: H = None
        self.o: C = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: B = None
        self.s: H = None
        self.u: D = None
        self.z: C = None
        self.q: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: D = None
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: E = None
        self.v: H = None
        self.o: C = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: B = None
        self.s: H = None
        self.u: D = None
        self.z: C = None
        self.q: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: D = None
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

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

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