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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: D = None
        self.y: G = None
        self.z: F = None
        self.t: C = None
        self.u: G = None
        self.w: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: B = None
        self.u: A = None
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: A = None
        self.s: D = None
        self.x: B = None
        self.z: F = None
        self.v: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: D = None
        self.y: G = None
        self.z: F = None
        self.t: C = None
        self.u: G = None
        self.w: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: B = None
        self.u: A = None
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: A = None
        self.s: D = None
        self.x: B = None
        self.z: F = None
        self.v: D = None
        self.txt = txt

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

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

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