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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: B = None
        self.y: G = None
        self.w: G = None
        self.u: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: B = None
        self.v: H = None
        self.o: E = None
        self.p: A = None
        self.q: A = None
        self.s: E = None
        self.txt = txt

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

f = A("f")
m = B("m")
g = C("g")
d = D("d")
l = E("l")
b = F("b")
a = G("a")
c = H("c")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: B = None
        self.y: G = None
        self.w: G = None
        self.u: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: B = None
        self.v: H = None
        self.o: E = None
        self.p: A = None
        self.q: A = None
        self.s: E = None
        self.txt = txt

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

f = A("f")
m = B("m")
g = C("g")
d = D("d")
l = E("l")
b = F("b")
a = G("a")
c = H("c")

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