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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: A = None
        self.z: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.r: D = None
        self.u: D = None
        self.v: F = None
        self.z: E = None
        self.x: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: A = None
        self.u: A = None
        self.s: C = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: A = None
        self.s: F = None
        self.t: D = None
        self.q: C = None
        self.y: B = None
        self.txt = txt

b = A("b")
f = B("f")
n = C("n")
l = D("l")
h = E("h")
m = F("m")
e = A("e")
d = F("d")
g = C("g")

b.v = d
b.y = h
b.q = f
b.t = e
f.x = e
f.s = b
f.z = m
n.s = l
n.r = l
n.u = l
n.x = l
n.v = d
n.z = h
l.s = d
l.x = d
h.z = n
h.s = n
h.t = b
h.u = b
h.v = b
m.r = d
m.s = d
m.x = e
m.t = l
m.q = n
m.y = f
e.v = m
e.y = h
e.q = f
e.t = b
d.r = m
d.s = m
d.x = b
d.t = l
d.q = n
d.y = f
g.s = l
g.r = l
g.u = l
g.x = l
g.v = m
g.z = h
assert b.y.u.v.y.txt == "
class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: E = None
        self.q: B = None
        self.t: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: A = None
        self.z: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.r: D = None
        self.u: D = None
        self.v: F = None
        self.z: E = None
        self.x: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: A = None
        self.u: A = None
        self.s: C = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: A = None
        self.s: F = None
        self.t: D = None
        self.q: C = None
        self.y: B = None
        self.txt = txt

b = A("b")
f = B("f")
n = C("n")
l = D("l")
h = E("h")
m = F("m")
e = A("e")
d = F("d")
g = C("g")

b.v = d
b.y = h
b.q = f
b.t = e
f.x = e
f.s = b
f.z = m
n.s = l
n.r = l
n.u = l
n.x = l
n.v = d
n.z = h
l.s = d
l.x = d
h.z = n
h.s = n
h.t = b
h.u = b
h.v = b
m.r = d
m.s = d
m.x = e
m.t = l
m.q = n
m.y = f
e.v = m
e.y = h
e.q = f
e.t = b
d.r = m
d.s = m
d.x = b
d.t = l
d.q = n
d.y = f
g.s = l
g.r = l
g.u = l
g.x = l
g.v = m
g.z = h
assert b.y.u.v.y.txt == "f"