class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: A = None
        self.q: B = None
        self.x: F = None
        self.w: B = None
        self.r: F = None
        self.o: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: D = None
        self.o: F = None
        self.z: A = None
        self.t: G = None
        self.u: D = None
        self.s: F = None
        self.txt = txt

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

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

n = A("n")
h = B("h")
b = C("b")
f = D("f")
d = E("d")
j = F("j")
l = G("l")
i = A("i")

n.v = b
n.s = i
n.q = h
n.w = h
n.x = j
n.r = j
n.o = d
h.o = j
h.u = n
b.o = f
b.r = h
f.o = l
f.t = b
f.p = d
f.z = i
d.r = f
d.x = f
d.u = f
d.o = j
d.s = j
d.z = n
d.t = l
j.u = h
j.x = f
l.z = j
l.x = j
l.q = f
l.v = f
l.u = f
l.s = d
i.v = b
i.s = n
i.q = h
i.w = h
i.x = j
i.r = j
i.o = d
assert j.x.o.s.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: A = None
        self.q: B = None
        self.x: F = None
        self.w: B = None
        self.r: F = None
        self.o: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: D = None
        self.o: F = None
        self.z: A = None
        self.t: G = None
        self.u: D = None
        self.s: F = None
        self.txt = txt

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

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

n = A("n")
h = B("h")
b = C("b")
f = D("f")
d = E("d")
j = F("j")
l = G("l")
i = A("i")

n.v = b
n.s = i
n.q = h
n.w = h
n.x = j
n.r = j
n.o = d
h.o = j
h.u = n
b.o = f
b.r = h
f.o = l
f.t = b
f.p = d
f.z = i
d.r = f
d.x = f
d.u = f
d.o = j
d.s = j
d.z = n
d.t = l
j.u = h
j.x = f
l.z = j
l.x = j
l.q = f
l.v = f
l.u = f
l.s = d
i.v = b
i.s = n
i.q = h
i.w = h
i.x = j
i.r = j
i.o = d
assert j.x.o.s.txt == "d"