class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: A = None
        self.y: E = None
        self.v: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: A = None
        self.txt = txt

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

k.o = f
k.r = f
a.q = d
a.v = j
h.q = j
h.p = k
h.y = d
h.v = g
n.s = k
n.r = k
n.u = g
n.z = f
n.y = j
j.w = k
j.s = i
j.x = d
j.q = b
i.o = g
f.w = b
f.z = k
b.q = d
b.v = j
g.o = f
g.r = f
d.w = k
d.s = i
d.x = j
d.q = b
assert i.o.r.w.v.q.txt == "
class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: A = None
        self.y: E = None
        self.v: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: A = None
        self.txt = txt

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

k.o = f
k.r = f
a.q = d
a.v = j
h.q = j
h.p = k
h.y = d
h.v = g
n.s = k
n.r = k
n.u = g
n.z = f
n.y = j
j.w = k
j.s = i
j.x = d
j.q = b
i.o = g
f.w = b
f.z = k
b.q = d
b.v = j
g.o = f
g.r = f
d.w = k
d.s = i
d.x = j
d.q = b
assert i.o.r.w.v.q.txt == "b"