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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: A = None
        self.q: F = None
        self.z: C = None
        self.v: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.p: F = None
        self.o: F = None
        self.r: F = None
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: C = None
        self.s: C = None
        self.txt = txt

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

i.v = h
i.y = l
h.y = c
h.p = i
h.q = j
h.z = l
h.v = a
l.v = c
l.p = h
l.z = h
l.x = a
g.u = l
g.q = f
a.u = h
a.v = h
a.p = f
a.r = f
a.o = n
j.r = f
j.z = l
j.s = l
c.v = h
c.y = l
f.r = j
f.z = l
f.s = l
n.r = f
n.z = l
n.s = l
assert h.v.u.z.txt == "
class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: A = None
        self.q: F = None
        self.z: C = None
        self.v: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.p: F = None
        self.o: F = None
        self.r: F = None
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: C = None
        self.s: C = None
        self.txt = txt

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

i.v = h
i.y = l
h.y = c
h.p = i
h.q = j
h.z = l
h.v = a
l.v = c
l.p = h
l.z = h
l.x = a
g.u = l
g.q = f
a.u = h
a.v = h
a.p = f
a.r = f
a.o = n
j.r = f
j.z = l
j.s = l
c.v = h
c.y = l
f.r = j
f.z = l
f.s = l
n.r = f
n.z = l
n.s = l
assert h.v.u.z.txt == "l"