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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.v: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.q: E = None
        self.x: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: C = None
        self.r: E = None
        self.w: A = None
        self.t: C = None
        self.u: B = None
        self.z: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.v: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.q: E = None
        self.x: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: C = None
        self.r: E = None
        self.w: A = None
        self.t: C = None
        self.u: B = None
        self.z: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

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