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

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

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.s: A = None
        self.p: B = None
        self.v: A = None
        self.u: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.z: A = None
        self.x: I = None
        self.o: H = None
        self.q: I = None
        self.r: I = None
        self.p: I = None
        self.v: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: D = None
        self.u: E = None
        self.p: E = None
        self.s: D = None
        self.v: A = None
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.s: D = None
        self.x: I = None
        self.q: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: G = None
        self.s: E = None
        self.w: C = None
        self.x: G = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.s: A = None
        self.p: B = None
        self.v: A = None
        self.u: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.z: A = None
        self.x: I = None
        self.o: H = None
        self.q: I = None
        self.r: I = None
        self.p: I = None
        self.v: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: D = None
        self.u: E = None
        self.p: E = None
        self.s: D = None
        self.v: A = None
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.s: D = None
        self.x: I = None
        self.q: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: G = None
        self.s: E = None
        self.w: C = None
        self.x: G = None
        self.txt = txt

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

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

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