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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: G = None
        self.x: D = None
        self.txt = txt

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

i = A("i")
c = B("c")
n = C("n")
l = D("l")
b = E("b")
e = F("e")
h = G("h")

i.t = c
i.y = n
i.v = n
i.o = e
i.w = h
i.r = l
c.u = l
c.x = b
n.y = l
n.q = c
l.r = h
l.p = e
b.p = n
b.r = h
e.y = n
e.s = h
e.x = l
h.y = b
h.v = i
assert l.r.v.w.v.v.q.txt == "
class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: C = None
        self.o: F = None
        self.w: G = None
        self.r: D = None
        self.v: C = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: G = None
        self.x: D = None
        self.txt = txt

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

i = A("i")
c = B("c")
n = C("n")
l = D("l")
b = E("b")
e = F("e")
h = G("h")

i.t = c
i.y = n
i.v = n
i.o = e
i.w = h
i.r = l
c.u = l
c.x = b
n.y = l
n.q = c
l.r = h
l.p = e
b.p = n
b.r = h
e.y = n
e.s = h
e.x = l
h.y = b
h.v = i
assert l.r.v.w.v.v.q.txt == "c"