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

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: D = None
        self.p: C = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: G = None
        self.p: G = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: B = None
        self.txt = txt

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

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

i.w = g
c.o = i
c.y = l
c.p = j
b.s = h
b.x = l
b.p = j
l.p = g
l.v = g
l.q = b
l.x = c
l.z = m
l.s = h
h.v = c
h.z = g
h.p = g
h.u = l
m.u = b
m.o = c
g.u = m
g.o = l
g.q = l
g.s = i
g.r = h
j.s = h
j.x = l
j.p = b
assert h.v.o.w.s.w.u.u.x.txt == "
class A:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: D = None
        self.p: C = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: G = None
        self.p: G = None
        self.u: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: B = None
        self.txt = txt

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

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

i.w = g
c.o = i
c.y = l
c.p = j
b.s = h
b.x = l
b.p = j
l.p = g
l.v = g
l.q = b
l.x = c
l.z = m
l.s = h
h.v = c
h.z = g
h.p = g
h.u = l
m.u = b
m.o = c
g.u = m
g.o = l
g.q = l
g.s = i
g.r = h
j.s = h
j.x = l
j.p = b
assert h.v.o.w.s.w.u.u.x.txt == "l"