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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: A = None
        self.v: D = None
        self.u: F = None
        self.o: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.r: B = None
        self.s: A = None
        self.x: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: G = None
        self.u: D = None
        self.y: G = None
        self.q: D = None
        self.v: C = None
        self.txt = txt

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

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

m = A("m")
f = B("f")
d = C("d")
e = D("e")
h = E("h")
j = F("j")
a = G("a")
n = H("n")
l = F("l")

m.w = j
m.x = l
f.z = m
f.x = m
f.v = e
f.o = e
f.u = l
d.q = n
d.x = n
d.r = f
d.s = m
e.z = l
h.q = f
h.v = j
j.s = l
j.p = a
j.y = a
j.u = e
j.q = e
j.v = d
a.s = e
a.o = n
a.q = n
a.u = n
a.z = h
a.v = f
a.x = f
n.v = j
l.s = j
l.p = a
l.y = a
l.u = e
l.q = e
l.v = d
assert f.u.y.z.v.v.txt == "
class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: A = None
        self.v: D = None
        self.u: F = None
        self.o: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.r: B = None
        self.s: A = None
        self.x: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: G = None
        self.u: D = None
        self.y: G = None
        self.q: D = None
        self.v: C = None
        self.txt = txt

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

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

m = A("m")
f = B("f")
d = C("d")
e = D("e")
h = E("h")
j = F("j")
a = G("a")
n = H("n")
l = F("l")

m.w = j
m.x = l
f.z = m
f.x = m
f.v = e
f.o = e
f.u = l
d.q = n
d.x = n
d.r = f
d.s = m
e.z = l
h.q = f
h.v = j
j.s = l
j.p = a
j.y = a
j.u = e
j.q = e
j.v = d
a.s = e
a.o = n
a.q = n
a.u = n
a.z = h
a.v = f
a.x = f
n.v = j
l.s = j
l.p = a
l.y = a
l.u = e
l.q = e
l.v = d
assert f.u.y.z.v.v.txt == "d"