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

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

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.v: B = None
        self.y: A = None
        self.w: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: D = None
        self.q: E = None
        self.t: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.v: B = None
        self.y: A = None
        self.w: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: D = None
        self.q: E = None
        self.t: D = None
        self.txt = txt

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

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