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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: B = None
        self.x: B = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: B = None
        self.x: B = None
        self.txt = txt

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

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

i.o = h
i.s = h
i.r = f
i.t = k
c.s = b
c.o = d
c.v = h
d.p = a
d.s = f
d.q = h
d.y = h
d.r = i
d.v = k
d.o = c
a.w = h
a.o = h
a.q = h
a.r = b
a.x = f
a.t = d
h.x = f
h.w = f
k.z = f
k.q = c
k.x = b
f.q = k
f.o = i
f.z = i
b.s = c
b.o = d
b.v = h
assert c.s.v.w.q.q.o.txt == "d"