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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: E = None
        self.o: D = None
        self.y: A = None
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: B = None
        self.q: B = None
        self.txt = txt

d = A("d")
g = B("g")
l = C("l")
j = D("j")
m = E("m")
k = F("k")
i = E("i")
e = B("e")
c = D("c")
n = A("n")

d.x = g
d.y = l
d.v = l
d.w = n
g.x = k
g.p = c
l.p = n
l.q = n
l.z = k
l.y = g
j.v = l
j.y = c
m.v = l
m.s = l
m.q = i
m.o = c
m.y = n
k.z = i
k.t = g
k.q = e
i.v = l
i.s = l
i.q = m
i.o = c
i.y = d
e.x = k
e.p = c
c.v = l
c.y = j
n.x = e
n.y = l
n.v = l
n.w = d
assert g.p.v.y.p.y.v.z.t.p.v.txt == "
class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: C = None
        self.v: C = None
        self.w: A = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: E = None
        self.o: D = None
        self.y: A = None
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: B = None
        self.q: B = None
        self.txt = txt

d = A("d")
g = B("g")
l = C("l")
j = D("j")
m = E("m")
k = F("k")
i = E("i")
e = B("e")
c = D("c")
n = A("n")

d.x = g
d.y = l
d.v = l
d.w = n
g.x = k
g.p = c
l.p = n
l.q = n
l.z = k
l.y = g
j.v = l
j.y = c
m.v = l
m.s = l
m.q = i
m.o = c
m.y = n
k.z = i
k.t = g
k.q = e
i.v = l
i.s = l
i.q = m
i.o = c
i.y = d
e.x = k
e.p = c
c.v = l
c.y = j
n.x = e
n.y = l
n.v = l
n.w = d
assert g.p.v.y.p.y.v.z.t.p.v.txt == "l"