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

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: D = None
        self.z: E = None
        self.w: G = None
        self.o: D = None
        self.u: D = None
        self.p: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

f = A("f")
j = B("j")
l = C("l")
i = D("i")
a = E("a")
b = F("b")
h = G("h")
c = B("c")
d = G("d")

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

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: D = None
        self.z: E = None
        self.w: G = None
        self.o: D = None
        self.u: D = None
        self.p: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

f = A("f")
j = B("j")
l = C("l")
i = D("i")
a = E("a")
b = F("b")
h = G("h")
c = B("c")
d = G("d")

f.y = c
f.r = l
j.r = c
j.y = c
j.z = b
j.x = b
j.u = l
j.q = l
j.p = a
l.r = i
l.s = i
l.o = i
l.u = i
l.z = a
l.w = d
l.p = b
i.o = h
i.w = f
i.y = l
i.r = j
i.u = c
a.o = b
b.v = a
h.p = a
h.q = i
h.o = f
h.z = b
h.r = b
h.t = b
c.r = j
c.y = j
c.z = b
c.x = b
c.u = l
c.q = l
c.p = a
d.p = a
d.q = i
d.o = f
d.z = b
d.r = b
d.t = b
assert c.u.p.v.o.v.o.v.txt == "a"