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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.w: D = None
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: G = None
        self.p: A = None
        self.v: E = None
        self.x: G = None
        self.t: F = None
        self.z: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: A = None
        self.r: B = None
        self.txt = txt

k = A("k")
h = B("h")
j = C("j")
c = D("c")
g = E("g")
l = F("l")
e = G("e")

k.o = l
k.x = h
k.r = h
k.y = j
k.v = c
k.w = e
h.t = e
h.w = c
h.q = l
j.w = k
j.p = k
j.r = e
j.x = e
j.v = g
j.t = l
j.z = h
c.o = e
c.q = l
g.x = e
g.y = h
l.w = g
e.p = g
e.t = k
e.r = h
assert c.o.r.t.txt == "
class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.x: B = None
        self.y: C = None
        self.v: D = None
        self.w: G = None
        self.r: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.w: D = None
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: G = None
        self.p: A = None
        self.v: E = None
        self.x: G = None
        self.t: F = None
        self.z: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: A = None
        self.r: B = None
        self.txt = txt

k = A("k")
h = B("h")
j = C("j")
c = D("c")
g = E("g")
l = F("l")
e = G("e")

k.o = l
k.x = h
k.r = h
k.y = j
k.v = c
k.w = e
h.t = e
h.w = c
h.q = l
j.w = k
j.p = k
j.r = e
j.x = e
j.v = g
j.t = l
j.z = h
c.o = e
c.q = l
g.x = e
g.y = h
l.w = g
e.p = g
e.t = k
e.r = h
assert c.o.r.t.txt == "e"