class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: G = None
        self.y: C = None
        self.w: C = None
        self.r: C = None
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: F = None
        self.p: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: E = None
        self.z: G = None
        self.s: F = None
        self.r: F = None
        self.v: D = None
        self.txt = txt

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

d.w = a
d.y = b
n.z = a
n.v = m
n.o = m
n.y = i
n.w = i
n.r = i
i.x = d
i.u = l
b.z = c
b.u = l
b.p = m
b.y = i
b.x = a
l.o = i
l.z = a
l.p = a
a.v = k
a.x = i
a.z = i
m.v = n
m.s = k
k.q = b
k.v = b
k.o = l
k.z = m
k.s = a
k.r = a
c.z = b
c.u = l
c.p = m
c.y = i
c.x = a
assert a.v.v.y.x.y.txt == "
class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: G = None
        self.y: C = None
        self.w: C = None
        self.r: C = None
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: F = None
        self.p: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: E = None
        self.z: G = None
        self.s: F = None
        self.r: F = None
        self.v: D = None
        self.txt = txt

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

d.w = a
d.y = b
n.z = a
n.v = m
n.o = m
n.y = i
n.w = i
n.r = i
i.x = d
i.u = l
b.z = c
b.u = l
b.p = m
b.y = i
b.x = a
l.o = i
l.z = a
l.p = a
a.v = k
a.x = i
a.z = i
m.v = n
m.s = k
k.q = b
k.v = b
k.o = l
k.z = m
k.s = a
k.r = a
c.z = b
c.u = l
c.p = m
c.y = i
c.x = a
assert a.v.v.y.x.y.txt == "b"