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

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: G = None
        self.y: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: E = None
        self.y: E = None
        self.t: F = None
        self.o: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: G = None
        self.o: D = None
        self.r: G = None
        self.p: A = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: A = None
        self.y: C = None
        self.w: D = None
        self.txt = txt

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

j.o = l
j.v = l
f.r = j
f.z = i
f.o = a
f.v = n
f.q = d
n.o = k
n.y = k
n.v = a
i.q = n
i.w = k
i.y = k
i.t = d
i.o = a
k.y = d
k.p = d
k.q = f
d.q = l
d.v = a
d.r = a
d.x = a
d.o = i
d.p = j
a.x = k
a.t = j
a.y = l
a.w = i
l.o = k
l.y = k
l.v = a
assert d.p.o.y.y.txt == "
class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: G = None
        self.y: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: E = None
        self.y: E = None
        self.t: F = None
        self.o: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: G = None
        self.o: D = None
        self.r: G = None
        self.p: A = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: A = None
        self.y: C = None
        self.w: D = None
        self.txt = txt

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

j.o = l
j.v = l
f.r = j
f.z = i
f.o = a
f.v = n
f.q = d
n.o = k
n.y = k
n.v = a
i.q = n
i.w = k
i.y = k
i.t = d
i.o = a
k.y = d
k.p = d
k.q = f
d.q = l
d.v = a
d.r = a
d.x = a
d.o = i
d.p = j
a.x = k
a.t = j
a.y = l
a.w = i
l.o = k
l.y = k
l.v = a
assert d.p.o.y.y.txt == "d"