class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: H = None
        self.r: A = None
        self.q: I = None
        self.p: B = None
        self.o: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.v: C = None
        self.u: G = None
        self.p: E = None
        self.x: F = None
        self.w: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: G = None
        self.s: H = None
        self.txt = txt

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

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.v: C = None
        self.u: G = None
        self.p: E = None
        self.x: F = None
        self.w: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: G = None
        self.s: H = None
        self.txt = txt

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

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

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

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

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

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

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

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