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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: G = None
        self.x: E = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: B = None
        self.z: D = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: G = None
        self.x: E = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: B = None
        self.z: D = None
        self.txt = txt

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

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